import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        double a=sc.nextDouble();
        char b=sc.next().charAt(0);
        int money=20;
        if(a>1) {
            if(a>(int)a) {
                money=money+(int)a;
            }else {
                money=money+(int)(a-1);
            }
        }
        if(b=='y') {
            money+=5;
        }
        System.out.println(money);
    }
}